import socket
from multiprocessing import Process

socket = socket.socket()
socket.bind(('',8080))
socket.listen(5)

clientSocket = socket.accept()

while True:
	p = Process(target=fun, args=())
	p.start()
	clientSocket.close()


def fun(cliSocket):
	pass
	# 接收数据
	# request_data = recv()
	# print(request_data)
	# 解析HTTP报文数据 request_data
	# 提取请求方式
	# 提取请求路径path
	'''
	HTML_ROOT_DIR = "./index.html"  根路径
	/index.html
	file = open(HTML_ROOT_DIR)
	data = file.read()
	file.close()
	'''
	# 返回响应数据

	'''
	HTTP 1.1. 200 OK
	\r\n
	hello world
	'''
	# send()
	# close()

